import java.util.*;

public class ResponseVO<T extends Comparable<T> >{
    //定义泛型T
    private T max;
    private T min;

    public ResponseVO(T max, T min) {
        this.max = max;
        this.min = min;
    }

    //返回最大值
    public T getMax() {
        return max;
    }

    //返回最小值
    public  T getMin(){
        return max;
    }

    //修改数据
    public void setMax(T max) {
        if (max.compareTo(min) > 0) {
        T mid = min;
        min = max;
        max = mid;
    }
        this.max = max;
    }

    public  void setMin(T min){
        if (max.compareTo(min) < 0) {
            T mid = min;
            min = max;
            max = mid;
        }
        this.min=min;
    }

    //输出最大值最小值
    @Override
    public String toString() {
        return "ResponseVO{" +
                "max=" + max +
                ", min=" + min +
                '}';
    }

}
